package com.movitech.mobile.ddzy.modules.jobs;

import com.alibaba.fastjson.JSONArray;
import com.movitech.mobile.cz.base.purchase.service.WFlowFormAwardBidService;
import com.movitech.mobile.cz.base.supplier.service.SSuppliersService;
import com.movitech.mobile.ddzy.modules.syndata.service.impl.SynDataServiceImpl;
import com.movitech.mobile.task.CalibrationBidSynRabbitMQProducer;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 同步供应商数据到主数据
 *
 * @author luodz
 * @version 1.0.0
 * @description 同步供应商数据到主数据
 */
@Component
public class SynSuppliers2MDMJob {

    private static Logger logger = org.apache.log4j.Logger.getLogger(SynSuppliers2MDMJob.class);
    @Autowired
    SSuppliersService sSupplierService;

    @Scheduled(cron = "${job.scheduled.supplier2mdm}")
    public void batchSynSuppliers2Mdm() {
        logger.info("=============批量同步供方数据至主数据系统 定时任务 START===============");
        logger.info(LocalDateTime.now());
        // 查询未同步的定标信息
        sSupplierService.batchSynSuppliers2Mdm();
        logger.info(LocalDateTime.now());
        logger.info("=============批量同步供方数据至主数据系统 定时任务 END===============");
    }
}
